/*
 *
 * +----------------------------------------------------------------------
 * | 友得云客  - 开启房产营销新纪元
 * +----------------------------------------------------------------------
 * | Copyright (c) 2019~2024 优得（西安）信息科技有限公司版权所有
 * +----------------------------------------------------------------------
 * | Licensed 友得云客不是自有软件 未经允许不可移除相关版权
 * +----------------------------------------------------------------------
 * | Author: www.youdeyunke.com
 * +----------------------------------------------------------------------
 *
 */

import request from '@/utils/request'

// 生成二维码
export function refreshAuctionHouseQrcode(hid) {
  return request({
    url: '/admin6/auction_house/refresh_qrcode/' + hid,
    method: 'POST'
  })
}

export function getAuctionHouseList(params) {
  return request({
    url: '/admin6/auction_house',
    method: 'GET',
    params
  })
}

export function getAuctionHouseDetail(id) {
  return request({
    url: '/admin6/auction_house/' + id,
    method: 'GET'
  })
}

export function createAuctionHouse(data) {
  return request({
    url: '/admin6/auction_house',
    method: 'POST',
    data: data
  })
}

export function updateAuctionHouse(data) {
  return request({
    url: '/admin6/auction_house/' + data.id,
    method: 'patch',
    data: data
  })
}

export function deleteAuctionHouse(id) {
  return request({
    url: '/admin6/auction_house/' + id,
    method: 'delete'
  })
}

export function updateAuctionHousePublic(id) {
  return request({
    url: '/admin6/auction_house/is_public/' + id,
    method: 'patch'
  })
}

export function updateAuctionHouseTop(id) {
  return request({
    url: '/admin6/auction_house/is_top/' + id,
    method: 'patch'
  })
}

export function updateAuctionHouseContent(data) {
  return request({
    url: '/admin6/auction_house/content/' + data.id,
    method: 'patch',
    data: data
  })
}

export function updateAuctionHouseNotice(data) {
  return request({
    url: '/admin6/auction_house/notice/' + data.id,
    method: 'patch',
    data: data
  })
}

export function updateAuctionHouseShouldKnown(data) {
  return request({
    url: '/admin6/auction_house/should_known/' + data.id,
    method: 'patch',
    data: data
  })
}

export function updateAuctionHouseFile(data) {
  return request({
    url: '/admin6/auction_house/files/' + data.id,
    method: 'patch',
    data: data
  })
}

export function getWeappAuctionHouseList(params) {
  return request({
    url: '/v6/auction_house',
    method: 'get',
    params
  })
}

export function updateAuctionHouseStatus(data) {
  return request({
    url: '/admin6/auction_house/status/' + data.id,
    method: 'patch',
    data: data
  })
}

export function updateAuctionHouseImages(data) {
  return request({
    url: '/admin6/auction_house/images/' + data.id,
    method: 'patch',
    data: data
  })
}
